﻿using System;

namespace SlamCms.Data
{
	public class TrackNotFound
	{
		public int TrackNotFoundId { get; set; }
		public string Url { get; set; }
		public string Referrer { get; set; }
		public int? UserId { get; set; }
		public int Count { get; set; }
		public DateTime Date { get; set; }

		public static TrackNotFound Create(int? userId, string url, string referrer = null)
		{
			return new TrackNotFound()
			{
				Url = url,
				Referrer = referrer ?? string.Empty,
				UserId = userId,
				Date = DateTime.UtcNow,
				Count = 1
			};
		}
	}
}
